//
//  TestNetTool.h
//  POP_User
//
//  Created by Rowling on 2019/10/24.
//  Copyright © 2019 Rowling. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TestView.h"
#import "TestButton.h"
@class TestNetToolModel;
@class SocketModel;

@interface TestNetTool : NSObject

//singleton_interface(TestNetTool);

+ (TestNetTool *)shareInstance;


@property(nonatomic,strong)TestView * testView;
@property(nonatomic,strong)TestButton * testBtn;
@property(nonatomic,strong)NSMutableArray <TestNetToolModel *>* dataArray;
@property(nonatomic,strong)NSMutableArray <SocketModel *>* socektDataArray;
@property(nonatomic,strong)NSString * baseUrl;
@property(nonatomic,strong)NSString * socketUrl;
@property(nonatomic,strong)NSNumber *  socketPort;
@property(nonatomic,assign)BOOL  isOpen;


-(void)showVoiceVC;
-(void)addRecordUrl:(NSString *)url param:(id)param method:(NSString *)method respons:(id)respons;

-(void)addRecordUrl:(NSString *)url header:(nullable id)header param:(id)param method:(NSString *)method respons:(id)respons;

-(void)addSocketModel:(NSDictionary *)dic;
-(void)showNetTestVC;

@end

@interface TestNetToolModel : NSObject
@property(nonatomic,strong)NSString * timeStr;
@property(nonatomic,strong)NSString * urlStr;
@property(nonatomic,strong)NSString * methodStr;
@property(nonatomic,strong)NSString * paramStr;
@property(nonatomic,strong)NSString * responsStr;
@property(nonatomic,strong)NSString * headerStr;

@property(nonatomic,assign)CGFloat height;
@property(nonatomic,strong)NSAttributedString * attributesString;
-(void)caculate;
@end

@interface SocketModel : NSObject
@property(nonatomic,strong)NSString * timeStr;
@property(nonatomic,strong)NSString * dic;
@property(nonatomic,strong)NSDictionary * rawDic;

@end
